
import App from "../App"
import {
    BrowserRouter as Router,
    Route,
    Routes
} from 'react-router-dom';
import Home from "../views/Home"
import List from "../views/List"
import Introduction from "../views/Introduction"
import Form from "../views/Form"
import Goods from "../hookTem/Goods"
import GoodsForm from "../hookTem/GoodsForm"
const Routers = () => {
    return (
        <Router>
            <Routes>
                <Route path='*' element={
                    <main style={{ padding: "1rem" }}>
                        <p>There's nothing here!</p>
                    </main>
                } />
                <Route path='/' element={<App />}>
                    <Route path="" element={<Home />}></Route>
                    <Route path="home" element={<Home />}></Route>
                    <Route path="list" element={<List />}>
                        <Route path="form" element={<Form />}></Route>
                    </Route>
                    <Route path="baidu" element={<Introduction />}></Route>
                    <Route path="goods" element={<Goods/>}>
                        <Route path=":id" element={<GoodsForm/>}></Route>
                    </Route>
                </Route>
            </Routes>
        </Router>
    )
}

export default Routers